<template>
  <div class="layout-padding-auto layout-padding-view">
    <el-form :model="state.queryForm" ref="queryRef" :inline="true">
    </el-form>
    <el-table :data="state.dataList" highlight-current-row v-loading="state.loading" border
      style="width: 100%; height: 100%" :cell-style="tableStyle.cellStyle" stripe
      :header-cell-style="tableStyle.headerCellStyle" ref="tableRef">
      <el-table-column :label="$t('bigMaterial.bigMaterialMsg')">
        <el-table-column :label="$t('bigMaterial.materialMsg')">
          <el-table-column prop="materialCode" :label="$t('bigMaterial.materialCode')" show-overflow-tooltip width="150" />
      <el-table-column prop="materialName" :label="$t('bigMaterial.materialName')" show-overflow-tooltip width="200" />
      <el-table-column prop="qty" :label="$t('bigMaterial.qty')" show-overflow-tooltip />
      <el-table-column prop="prdUnit" :label="$t('bigMaterial.prdUnit')" show-overflow-tooltip />
      <el-table-column prop="locationCode" :label="$t('bigMaterial.locationCode')" show-overflow-tooltip />
      <el-table-column prop="locationName" :label="$t('bigMaterial.locationName')" show-overflow-tooltip />
        </el-table-column>
        <el-table-column :label="$t('bigMaterial.instockMsg')">
          <el-table-column prop="produceEndTime" :label="$t('bigMaterial.produceEndTime')" show-overflow-tooltip />
          <el-table-column prop="creationTime" :label="$t('bigMaterial.creationTime')" show-overflow-tooltip />
        </el-table-column>
      
    </el-table-column>
    </el-table>
    <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
  </div>
</template>
<script setup lang="ts">
import { BasicTableProps, useTable } from "/@/hooks/table";
import { reactive, ref } from 'vue';
import { GetBigMaterialRecords } from '/@/api/platform/report/bigMaterial';
import { ElMessage } from 'element-plus';
import { useI18n } from 'vue-i18n';

const { t } = useI18n();

const state: BasicTableProps = reactive<BasicTableProps>({
  queryForm: {
  },
  pageList: GetBigMaterialRecords
})

const {
  getDataList,
  currentChangeHandle,
  sizeChangeHandle,
  tableStyle
} = useTable(state)
const tableRef = ref();

</script>